package com.kuang.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

//等价于在xml中注册一个<bean/>
@Component
@Scope("singleton")
public class User {

    //相当于<property name="name" value="小兰"/>
    @Value("小兰")//也可注入到set方法上面
    public String name;


}
